Click here to Skip to main content
15,885,278 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Calling webservice Pin
sashidhar10-Feb-10 18:24
sashidhar10-Feb-10 18:24 
GeneralRe: Calling webservice Pin
Ramkithepower11-Feb-10 6:03
Ramkithepower11-Feb-10 6:03 
GeneralRe: Calling webservice Pin
sashidhar11-Feb-10 17:43
sashidhar11-Feb-10 17:43 
QuestionWorking with Memory Streams Pin
Hema Bairavan10-Feb-10 7:19
Hema Bairavan10-Feb-10 7:19 
AnswerRe: Working with Memory Streams Pin
Steve Wellens10-Feb-10 7:49
Steve Wellens10-Feb-10 7:49 
GeneralRe: Working with Memory Streams Pin
Hema Bairavan10-Feb-10 8:11
Hema Bairavan10-Feb-10 8:11 
GeneralRe: Working with Memory Streams Pin
Steve Wellens10-Feb-10 8:16
Steve Wellens10-Feb-10 8:16 
GeneralRe: Working with Memory Streams Pin
Hema Bairavan10-Feb-10 8:21
Hema Bairavan10-Feb-10 8:21 
DataTable dt = new DataTable();

dt = _dal.ExecuteQuery_Out("select * from table1");

ReportDocument[] rd = new ReportDocument[2];

rd[0] = new ReportDocument();
rd[0].Load(Server.MapPath("ResultReport.rpt"));
rd[0].SetDataSource(dt);

dt = new DataTable();

dt = _dal.ExecuteQuery_Out("select * from table2");

rd[1] = new ReportDocument();
rd[1].Load(Server.MapPath("ResultReport.rpt"));
rd[1].SetDataSource(dt);

MemoryStream Parent1 = new MemoryStream();
MemoryStream[] Parentar = new MemoryStream[2];

byte[] parent = new byte[2];

//MemoryStream Mem;
//Mem = (MemoryStream)rd1.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

//byte[] bytearray = Mem.ToArray();

int h = 1;
for (int i = 0; i < rd.Length; i++)
{

Parentar[i] = (MemoryStream)rd[i].ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);


//Array.Copy(Mem.ToArray(), parent, h);
//h++;
//((byte[])Mem.ToArray()).CopyTo(parent, h);
//h = ((byte[])Mem.ToArray()).Length + 1;
}

long length = 0;
for (int i = 0; i < Parentar.Length; i++)
{
length += Parentar[i].Length;
Parentar[i].Close();
}

Parent1.SetLength(length);

for (int i = 0; i < Parentar.Length; i++)
{
/* your code*/
Parent1.Write(Parentar[i].ToArray())
/* my code*/
byte[] b = Parentar[i].ToArray();

foreach (byte b1 in b)
Parent1.WriteByte(b1);
}
Parent1.Close();



Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(Parent1.ToArray());


here i should get both the report documents result in the pdf,
am i correct..

actually simulatenously i was working and i did some codes though here..

but am getting the last things in the out put..am i not dealing with the streams correctly like closing at appropriate place?

even in the debug mode the Parent1 current postiion is increasing while looping the second one..but am not getting
AnswerRe: Working with Memory Streams Pin
i gr810-Feb-10 18:18
i gr810-Feb-10 18:18 
GeneralRe: Working with Memory Streams Pin
Hema Bairavan10-Feb-10 19:06
Hema Bairavan10-Feb-10 19:06 
QuestionInvalid registration key Pin
nakins10-Feb-10 5:00
nakins10-Feb-10 5:00 
QuestionOther alternative to WS-Security [modified] Pin
raquidd2210-Feb-10 4:04
raquidd2210-Feb-10 4:04 
AnswerRe: call web service from one server Pin
N a v a n e e t h10-Feb-10 4:23
N a v a n e e t h10-Feb-10 4:23 
QuestionHow to play movie clips and swf files in asp.net Pin
CHANDUA10-Feb-10 2:27
CHANDUA10-Feb-10 2:27 
AnswerRe: How to play movie clips and swf files in asp.net Pin
Richard MacCutchan10-Feb-10 4:45
mveRichard MacCutchan10-Feb-10 4:45 
QuestionPopUp Pin
Civic0610-Feb-10 2:12
Civic0610-Feb-10 2:12 
AnswerRe: PopUp Pin
PunkIsNotDead10-Feb-10 8:32
PunkIsNotDead10-Feb-10 8:32 
GeneralRe: PopUp Pin
Civic0611-Feb-10 2:15
Civic0611-Feb-10 2:15 
QuestionBoundFiled/GridView Pin
-Muc_10-Feb-10 1:25
-Muc_10-Feb-10 1:25 
AnswerRe: BoundFiled/GridView Pin
PunkIsNotDead10-Feb-10 8:26
PunkIsNotDead10-Feb-10 8:26 
GeneralRe: BoundFiled/GridView Pin
-Muc_10-Feb-10 9:18
-Muc_10-Feb-10 9:18 
GeneralRe: BoundFiled/GridView Pin
PunkIsNotDead10-Feb-10 10:40
PunkIsNotDead10-Feb-10 10:40 
QuestionIndex was outside the bounds of the array? Pin
mdrizwan_110-Feb-10 0:36
mdrizwan_110-Feb-10 0:36 
AnswerRe: Index was outside the bounds of the array? Pin
Gaurav Dudeja India10-Feb-10 1:13
Gaurav Dudeja India10-Feb-10 1:13 
GeneralRe: Index was outside the bounds of the array? Pin
mdrizwan_110-Feb-10 1:40
mdrizwan_110-Feb-10 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.