Wednesday, March 28, 2012
How to Remove Blank Pages CrystalReport9 problem
I have designed report which do not have any group. It shows last page blank although it does not contain any record.I have tried with these
In SectionExpert=>NewPageAfter
IF OnLastRecord then
if isNull({Command.SNPSHT_ID}) then
formula = False
end if
end if
Please help to solve theseplease help me with removal of blank pages in crystalreport9|||if onlastrecord then
false
else
true
Try this formula on SectionExpert=>Page Footer->New Page After...
Don't forget to uncheck this option after writing formula.|||hi,
in PageFooter =>sectionexpert=>NewPageAfter is blocked|||oops sorry.
Try it in details section since u don't have group footer|||if onlastrecord then
false
else
true
Try this formula on SectionExpert=>Page Footer->New Page After...
Don't forget to uncheck this option after writing formula.
hi,
in PageFooter =>sectionexpert=>"NewPageAfter is blocked"
i have tried it in detail section which gives me one record on each page.
Please help me to resolve these problem|||remove else part from ur detail section formula.sql
Monday, March 26, 2012
How to release large unused/allocated space
Hi,
I have 6 filegroups that contain over 30 gigs of data. I manage the transaction log space efficiently by using a script and 'shrink database'. But, the allocated unused space of the data files are very large, over 30 gigs.
The configuration is standard for all files:
- Automatically grow file by percent
- Maximum file size - Unrestricted
How do I release the unused space?
Thanks,
- gshaf
Hi Gshaf,
You can issue the DBCC SHRINKDATABASE statement with TRUNCATEONLY. This will shrink the database the maximum amount possible, and release the space back to windows. If you want to control how much space in the db left for growth, you'll need to issue DBCC SHRINKFILE and specify the amount (MB) of space you want left:
DBCC SHRINKFILE(MyDataFileNameHere, 15000)
The above command will attempt to shrink the datafile "MyDataFileNameHere" to 15GB.
Cheers,
Rob
sqlHow to release large unused/allocated space
Hi,
I have 6 filegroups that contain over 30 gigs of data. I manage the transaction log space efficiently by using a script and 'shrink database'. But, the allocated unused space of the data files are very large, over 30 gigs.
The configuration is standard for all files:
- Automatically grow file by percent
- Maximum file size - Unrestricted
How do I release the unused space?
Thanks,
- gshaf
Hi Gshaf,
You can issue the DBCC SHRINKDATABASE statement with TRUNCATEONLY. This will shrink the database the maximum amount possible, and release the space back to windows. If you want to control how much space in the db left for growth, you'll need to issue DBCC SHRINKFILE and specify the amount (MB) of space you want left:
DBCC SHRINKFILE(MyDataFileNameHere, 15000)
The above command will attempt to shrink the datafile "MyDataFileNameHere" to 15GB.
Cheers,
Rob
Monday, March 19, 2012
How to redirect the error of a source Flat file to the Destination Flat file?
Hi all,
I m using SSIS and i am transfering the data from Flat File Source to the OLE DB destination File. The source file contain some corrupt data which i am transfering to the other Flat file destination file.
Debugging is succesful but i am not getting any error output in the Flat file destination file.
i had done exactly which is written in the msdn tutorial of SSIS.
Plz tell me why i am not getting the error output in the destination flat file?
thanx
have you set the Error Output to "Redirect Row" on the task ?Sunday, February 19, 2012
How to query for master-detail output on same page
I'd like to create a master-detail output from SQL2005 to display in a page using classic ASP. Ideally, I want the output to contain a <div> to show/hide the order details beneathe the order header, as shown below.
OrderNo OrderDate
1001 7/27/2007
+ <div to show/hide>
Item Description
AAA desc_for_itemAAA
BBB desc_for_itemBBB
+ </div>
1002 7/26/2007
+ <div to show/hide>
Item Description
CCC desc_for_itemCCC
+ </div>
I currently just have a stored procedure returning the results and it is very slow as I'm simply querying the details section for each order header. Does anyone have any ideas on how I can create an efficient and fast method for returning these results in the format above?
It’s always better to do these rendering on the ASP/UI page,
For your courtesy,
Code Snippet
Create Table #order (
[OrderNo] int ,
[OrderDate] datetime
);
Insert Into #order Values('1001','7/27/2007');
Insert Into #order Values('1002','7/26/2007');
Create Table #orderdetails (
[OrderNo] int ,
[Item] Varchar(100) ,
[Description] Varchar(100)
);
Insert Into #orderdetails Values('1001','AAA','desc_for_itemAAA');
Insert Into #orderdetails Values('1001','BBB','desc_for_itemBBB');
Insert Into #orderdetails Values('1002','CCC','desc_for_itemCCC');
Select
OrderNo,
OrderDate,
Replace(Replace((Select '<td>' + Item + '</td><td>' + Description + '</td>' as [text()] From #orderdetails OD Where OD.[OrderNo] = O.[OrderNo] For XML Path('tr')),'>','>'),'<','<')
From
#order O
<!--
On ASP/UI page,
While NOT rs.eof
Response.Write(“<tr><td>”)
Response.Write(rs(0))
Response.Write(“</td><td>”)
Response.Write(rs(1))
Response.Write(“</td></tr><tr>”)
Response.Write(“<td colspan=2><span style='cursor:hand' click=ExpandOrCollopse(‘div_” + rs(0) + “’)>+</span>”)
Response.Write (“<div style='display:none' id=’div_”)
Response.Write(rs(0))
Response.Write(“’><table>”)
Response.Write(rs(2))
Response.Write(“</table></div>”)
Wend
-->
|||What you are proposing is clearly a presentation side issue and should not be 'forced' on SQL Server.
I suggest that you may find utility in the new XML output functionality.
|||Manivannan, thanks for the sample code. I was able to create an output as you explained.
Arnie, can you point me to an easy to understand resource for this xml output functionality? I haven't really had any exposure to xml.
|||Here are a couple of resources to get you started:
http://www.topxml.com/sql/
http://technet.microsoft.com/en-us/library/ms175024.aspx
Using XML data is perfect for web applications.