Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Friday, March 30, 2012

Regarding Custom Code using table or list control(data set)

I have the report like this

list1

{

list2

{

table1

table header

table fields

table footer

}

}

now i want to calculate the sum of one field in table when it contains particular value using CUSTOM CODE ONLY

and i want to display it in table footer. please send me answer to this id as soon as possible.

Thanks

Sateesh Maduri

Maybe I'm missing something, but couldn't you just use a conditional aggregation expression like the following in the table footer:

=Sum(iif(Fields!A.Value = "abc", CInt(Fields!B.Value), 0))

-- Robert

|||

Hello Robert

Actually I already know that what u have given using sum().But I need Custom Code for that ,I mean if I have a dataset which fills the data in the table control How should I write Custom Code to calculate sum of one field when it contains particular value.

Thanks

sql

Regarding Custom Code

Hello

I have report like this

list1

list2(includes in list1)

table (includes in list2)

end of list2

end of list1

Now I want to calculate the sum of one column in table when it contains particular value and I want to display in table footer . I already know using sum() fuction.I want to know using custom code calculation for the above problem(How Can I repeat my data set in Custom code function for each row). So , If anyone knows Please reply.

It's Very Urgent

Thanks

Have a look at these

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=541699&SiteID=1

http://blogs.msdn.com/bwelcker/archive/2005/05/10/416306.aspx

Wednesday, March 28, 2012

Reg: Crystal report pie chart

Hi,
I am using VS.NET2002, Cr 9.1.I created one Report in which i am using pie chart.The problem is that i am getting report on development m/c but when i am running same exe on client m/c it is showing all other text object except Chart (i.e date,page no etc.)

Do i need to put any particular dll or file related to chart on client m/c

any help will be appreciated.....

Regards,
RiteshHi,
I got the solution on other forum.I copied the file sscsdk80.dll to client m/c and it did the trick.........

Ritesh|||Thanks for sharing the solution :)

Reg URL Report Access Path Format

I'm trying to render a report created using SSRS to open in a web browser in windows form.
This is the URL used:
"http://localhost/reportserver?/C:/Documents and Settings/xsbangalore/My Documents/Visual Studio 2005/Projects/prmRpt/prmRpt&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=false&StartDate='01/01/2005'&EndDate='01/01/2007'";

I'm not able to see the report.
Error: Unable to link to Web page

What is missing?

The URL must refer to a report that is in the Report Server catalog database. You cannot refer to documents on disc as reports. Upload the report to the Report Server and then use Report Manager or the reportserver url to browse to the report. From there you will see how a URL is constructed.

Example:

http://localhost/reportserver?/Report Project1/report1&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=false&StartDate='01/01/2005'&EndDate='01/01/2007'";

|||If I dont have a report server created, what's the alternative?

OR
How do I create a resport server instance?

Monday, March 26, 2012

reg exporting crystal reports to Excel format

Hi Babu,

I have created a report using crystal reports and the template has a field that is formatted with (PrintTime) and another field(File Creation Time). When i export this report to .doc file( using VC++ code) I can see the these fields properly. But when i export to .xls file I get ###### in these fields instead of the actual value. These "######" appear only for the time fields and not for the date fields. Also when the cell is formatted to hold a general value , the cell shows a long number.

Can you help as to what would have caused this problem and how i can rectify this?The "problem" you have is not really a problem, it's how Excel was designed to work.

Excel shows "####" when the column isn't wide enough to show the entire contents.

Excel treats dates as long numbers (probably the number of seconds from a certain date) and it's up to the user to make sure the Cell is formatted to display properly.

As for how to fix it, I'm not sure. You can try Crystal's website to see if you can find an article on formatting Excel Cells and Columns.

http://support.businessobjects.com/search/advsearch.asp|||I have increased the cell size and formatted it for showing time.
The ##### still exists. When i change the cell format to general(a long number) is displayed but in the time format these hashes appear|||You may may not be increasing the width of the column enough. In Excel, assuming that you have the date in cell A1, if you double-click the line that separates the column headers "A" and "B", Excel will automatically resize column "A" to fit the width of the longest Cell in the column. I'm not sure if it will help you in Crystal Reports, but in VB I can achieve this with the following line of code:

xlApp.ActiveSheet.Columns("A:A").EntireColumn.AutoFit|||Try printing Printtime and FileCreationDateTIme in different lines. Maybe it's a data issue. I hope there are no special characters in data. Also try displaying Just YYYY from both fields and slowly slowly try adding mm and dd etc..

THanks

reg Caching Configuration

Hi ,
I am trying to configure the Caching in Reporting Services. I came to know
that i have to store the credentials in the Report server. After storing the
credentitals in the report server using Datasource properties and i tried to
acess the report. i am getting following error.
â?¢ â'An error has occurred during report processing.
o Cannot create a connection to data source '<datasourcename>'.
Login failed for user '<user>'. The user is not associated with a trusted
SQL Server connection.
Is there anything I am missing here.
Thanks in advance
BhaskarBhaskar
I would suggest that sql server is rejecting the user name you are
using . Try to create a connection by using the connection wizard
which will allow you to test the connection. In visual studio right
click on shared datas sources and click on add new data source . In
the dialog box, instead of typing your connection string , click edit
try specifying sql server authentication. Click on test connection. if
that works , try using the connection to execute a query or stored
proc by creating a new data set .
Cheers
Shai
On Nov 20, 8:03 am, Bhaskar <Bhas...@.discussions.microsoft.com>
wrote:
> Hi ,
> I am trying to configure the Caching in Reporting Services. I came to know
> that i have to store the credentials in the Report server. After storing the
> credentitals in the report server using Datasource properties and i tried to
> acess the report. i am getting following error.
> * 'An error has occurred during report processing.
> o Cannot create a connection to data source '<datasourcename>'.
> Login failed for user '<user>'. The user is not associated with a trusted
> SQL Server connection.
> Is there anything I am missing here.
> Thanks in advance
> Bhaskar|||On Nov 19, 5:03 pm, Bhaskar <Bhas...@.discussions.microsoft.com> wrote:
> Hi ,
> I am trying to configure the Caching in Reporting Services. I came to know
> that i have to store the credentials in the Report server. After storing the
> credentitals in the report server using Datasource properties and i tried to
> acess the report. i am getting following error.
> * 'An error has occurred during report processing.
> o Cannot create a connection to data source '<datasourcename>'.
> Login failed for user '<user>'. The user is not associated with a trusted
> SQL Server connection.
> Is there anything I am missing here.
> Thanks in advance
> Bhaskar
Bhaskar,
Any time you see the word "Trusted" in an error messege it means you
have the database set to Windows Authentication only and you are
passing a User ID and Password in your connection. Either
1) Change the connection to Windows Authentication which will not
prompt for credentials OR
2) Right click on your SQL Server, not the database but the server,
and go to Properties -> Security; then change to SQL Server and
Windows Authenication mode.
Dennis

Refreshing report problem

Hi,
I did my report under a schema called billing and the new data is in schema called inteltest. Even i connect to the crystal reports using inteltest in the sql query it shows schema as billing4 . please help meHi, In the report goto File and see "Save Data wtih Report" option. If it is checked then uncheck it and save the report

Madhivanan

Refreshing Report Data in ReportViewer

Hi All,
I am using reportviewer component to present data,
On Clicking report button report is generated with data , now if one makes
some changes into database. and on cliking the view report button again
(second time or n times), it actually does not go to database and get the
latest update, Same old data is displayed with out updating with new records.
How to get the latest data from database on click of Report button when
there is change in the data in database
To over the above problem i followed two steps as follows.
1. In the Report Manager -> Property tab -> Execution Linke
the option "Render this report with the most recent data" is selected.
But this doen't work.
2. I don't want to check the AutoFresh Property of Report in VS.NET ( Reprot
Designer).
I am sure this is common problem which all might have faced .
It's very urgent, Pls Help
Thanks is Advance.
Regards,
Ajay Kumar
Thanks,
Jim.If you are doing this manually you can click the refresh button in the
report viewer. I have found that the "view report" button doesn't
refresh the report...it generally works off of a cached copy even if
you aren't caching. There is a small button just to the right of the
export area that will refresh the report.|||Yes, i know that there is refresh button but i need automatically. Any how
i have solved this by adding a line in reportviewer control.
Thanks
Ajay
"Luke" wrote:
> If you are doing this manually you can click the refresh button in the
> report viewer. I have found that the "view report" button doesn't
> refresh the report...it generally works off of a cached copy even if
> you aren't caching. There is a small button just to the right of the
> export area that will refresh the report.
>

refreshing report data

I found a post by someone who was having a problem with their reports
refreshing and the solution they got was...
"Please make sure that Report property "Autorefresh" is set to 0
(disabled)"
Where is this report property' I can't find it and I need this to
refresh my report...It's in the Report Properties dialog -> General tab.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Gearoid" <gearoid_healy@.yahoo.com> wrote in message
news:3d6ebe80.0409290348.6e07573b@.posting.google.com...
> I found a post by someone who was having a problem with their reports
> refreshing and the solution they got was...
> "Please make sure that Report property "Autorefresh" is set to 0
> (disabled)"
> Where is this report property' I can't find it and I need this to
> refresh my report...|||this isn't critical but I'm just curious at this stage - that option
isn't there for me... I've SP1 installed - does that make a
difference? Here's what I see on my report properties - general
tab...
Modified Date: 29/09/2004 15:58
Modified By: DOMAIN\user
Creation Date: 29/09/2004 15:58
Created By: DOMAIN\user
Size: 77 KB
Properties ----
--
Name: |______________________________|
Description: ---
| |
| |
| |
| |
|___________________________________________|
--
|_| Hide in list view
Report Definition ---
Edit Update
-- --
----
-- -- -- --
|Apply| |Create Linked Report| |Delete| |Move|
-- -- -- --
Create a linked report when you want to use different security or
parameters with the report.
"Ravi Mumulla \(Microsoft\)" <ravimu@.online.microsoft.com> wrote in message news:<#GhnpIjpEHA.2684@.TK2MSFTNGP11.phx.gbl>...
> It's in the Report Properties dialog -> General tab.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Gearoid" <gearoid_healy@.yahoo.com> wrote in message
> news:3d6ebe80.0409290348.6e07573b@.posting.google.com...
> > I found a post by someone who was having a problem with their reports
> > refreshing and the solution they got was...
> >
> > "Please make sure that Report property "Autorefresh" is set to 0
> > (disabled)"
> >
> > Where is this report property' I can't find it and I need this to
> > refresh my report...sql

Refreshing Data

Hi All,
I have A Report inwhich Data is Populated from a stored procedure,
When I add a new record in the database that value is not replicated
immediately in the reports.It does replicate after i close the browser and
reopen it.
Cant Understand where Im going wrong'
Can any1 help me out'
Thanks in advance...u can try hitting the refresh button...
other solution could be change the AutoRefresh property
The report doesn't show the new row because is not a "live" report, it needs
to be refreshed to show new data
Hope it helps,
Pablo Diaz
"Chandra" <Chandra@.discussions.microsoft.com> wrote in message
news:CFD08605-E9FF-45FB-8986-08B047826590@.microsoft.com...
> Hi All,
> I have A Report inwhich Data is Populated from a stored procedure,
> When I add a new record in the database that value is not replicated
> immediately in the reports.It does replicate after i close the browser and
> reopen it.
> Cant Understand where Im going wrong'
> Can any1 help me out'
> Thanks in advance...|||By default, we do not re-execute the query unless you click the refresh
button or ctrl-refresh in the browser. This is to maintain consistency
between actions like print, pagination, etc.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Pablo" <pabloda@.NOSPAMtimovil.com> wrote in message
news:udejkBM%23EHA.3708@.TK2MSFTNGP14.phx.gbl...
>u can try hitting the refresh button...
> other solution could be change the AutoRefresh property
> The report doesn't show the new row because is not a "live" report, it
> needs to be refreshed to show new data
> Hope it helps,
> Pablo Diaz
> "Chandra" <Chandra@.discussions.microsoft.com> wrote in message
> news:CFD08605-E9FF-45FB-8986-08B047826590@.microsoft.com...
>> Hi All,
>> I have A Report inwhich Data is Populated from a stored procedure,
>> When I add a new record in the database that value is not replicated
>> immediately in the reports.It does replicate after i close the browser
>> and
>> reopen it.
>> Cant Understand where Im going wrong'
>> Can any1 help me out'
>> Thanks in advance...
>|||But even after I clicked the browser refresh button, it still did not work. I
could see from SQL profiler that the stored proc for the report did not get
executed again.
"Brian Welcker [MSFT]" wrote:
> By default, we do not re-execute the query unless you click the refresh
> button or ctrl-refresh in the browser. This is to maintain consistency
> between actions like print, pagination, etc.
> --
> Brian Welcker
> Group Program Manager
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Pablo" <pabloda@.NOSPAMtimovil.com> wrote in message
> news:udejkBM%23EHA.3708@.TK2MSFTNGP14.phx.gbl...
> >u can try hitting the refresh button...
> > other solution could be change the AutoRefresh property
> > The report doesn't show the new row because is not a "live" report, it
> > needs to be refreshed to show new data
> >
> > Hope it helps,
> > Pablo Diaz
> >
> > "Chandra" <Chandra@.discussions.microsoft.com> wrote in message
> > news:CFD08605-E9FF-45FB-8986-08B047826590@.microsoft.com...
> >> Hi All,
> >> I have A Report inwhich Data is Populated from a stored procedure,
> >> When I add a new record in the database that value is not replicated
> >> immediately in the reports.It does replicate after i close the browser
> >> and
> >> reopen it.
> >> Cant Understand where Im going wrong'
> >> Can any1 help me out'
> >>
> >> Thanks in advance...
> >
> >
>
>|||Not the browser refresh button, you want the the refresh button to the right
of export or you have to do a ctrl-F5 (F5 is the browser refresh, Ctrl-F5 is
refresh without caching).
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"A Fu" <AFu@.discussions.microsoft.com> wrote in message
news:C4601584-0D4B-4C48-9739-18A857B0C7D7@.microsoft.com...
> But even after I clicked the browser refresh button, it still did not
work. I
> could see from SQL profiler that the stored proc for the report did not
get
> executed again.
>
> "Brian Welcker [MSFT]" wrote:
> > By default, we do not re-execute the query unless you click the refresh
> > button or ctrl-refresh in the browser. This is to maintain consistency
> > between actions like print, pagination, etc.
> >
> > --
> > Brian Welcker
> > Group Program Manager
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> > "Pablo" <pabloda@.NOSPAMtimovil.com> wrote in message
> > news:udejkBM%23EHA.3708@.TK2MSFTNGP14.phx.gbl...
> > >u can try hitting the refresh button...
> > > other solution could be change the AutoRefresh property
> > > The report doesn't show the new row because is not a "live" report, it
> > > needs to be refreshed to show new data
> > >
> > > Hope it helps,
> > > Pablo Diaz
> > >
> > > "Chandra" <Chandra@.discussions.microsoft.com> wrote in message
> > > news:CFD08605-E9FF-45FB-8986-08B047826590@.microsoft.com...
> > >> Hi All,
> > >> I have A Report inwhich Data is Populated from a stored
procedure,
> > >> When I add a new record in the database that value is not replicated
> > >> immediately in the reports.It does replicate after i close the
browser
> > >> and
> > >> reopen it.
> > >> Cant Understand where Im going wrong'
> > >> Can any1 help me out'
> > >>
> > >> Thanks in advance...
> > >
> > >
> >
> >
> >|||Unfortunately the application does not use the built-in report viewer at all.
It directly renders the reports in PDF. The solution I'm using right now is
create a dummy report param, the app will pass a random number to this param,
so the URL will be different each time. Not a great solution.
"Bruce L-C [MVP]" wrote:
> Not the browser refresh button, you want the the refresh button to the right
> of export or you have to do a ctrl-F5 (F5 is the browser refresh, Ctrl-F5 is
> refresh without caching).
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "A Fu" <AFu@.discussions.microsoft.com> wrote in message
> news:C4601584-0D4B-4C48-9739-18A857B0C7D7@.microsoft.com...
> > But even after I clicked the browser refresh button, it still did not
> work. I
> > could see from SQL profiler that the stored proc for the report did not
> get
> > executed again.
> >
> >
> > "Brian Welcker [MSFT]" wrote:
> >
> > > By default, we do not re-execute the query unless you click the refresh
> > > button or ctrl-refresh in the browser. This is to maintain consistency
> > > between actions like print, pagination, etc.
> > >
> > > --
> > > Brian Welcker
> > > Group Program Manager
> > > SQL Server Reporting Services
> > >
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > > "Pablo" <pabloda@.NOSPAMtimovil.com> wrote in message
> > > news:udejkBM%23EHA.3708@.TK2MSFTNGP14.phx.gbl...
> > > >u can try hitting the refresh button...
> > > > other solution could be change the AutoRefresh property
> > > > The report doesn't show the new row because is not a "live" report, it
> > > > needs to be refreshed to show new data
> > > >
> > > > Hope it helps,
> > > > Pablo Diaz
> > > >
> > > > "Chandra" <Chandra@.discussions.microsoft.com> wrote in message
> > > > news:CFD08605-E9FF-45FB-8986-08B047826590@.microsoft.com...
> > > >> Hi All,
> > > >> I have A Report inwhich Data is Populated from a stored
> procedure,
> > > >> When I add a new record in the database that value is not replicated
> > > >> immediately in the reports.It does replicate after i close the
> browser
> > > >> and
> > > >> reopen it.
> > > >> Cant Understand where Im going wrong'
> > > >> Can any1 help me out'
> > > >>
> > > >> Thanks in advance...
> > > >
> > > >
> > >
> > >
> > >
>
>|||Add this to your URL:
rs:ClearSession=true
How things are done really depends on how you are using it (URL Integration,
Web Services, Report Manager).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"A Fu" <AFu@.discussions.microsoft.com> wrote in message
news:D702D576-34FC-4760-9952-E18539108432@.microsoft.com...
> Unfortunately the application does not use the built-in report viewer at
all.
> It directly renders the reports in PDF. The solution I'm using right now
is
> create a dummy report param, the app will pass a random number to this
param,
> so the URL will be different each time. Not a great solution.
>
> "Bruce L-C [MVP]" wrote:
> > Not the browser refresh button, you want the the refresh button to the
right
> > of export or you have to do a ctrl-F5 (F5 is the browser refresh,
Ctrl-F5 is
> > refresh without caching).
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "A Fu" <AFu@.discussions.microsoft.com> wrote in message
> > news:C4601584-0D4B-4C48-9739-18A857B0C7D7@.microsoft.com...
> > > But even after I clicked the browser refresh button, it still did not
> > work. I
> > > could see from SQL profiler that the stored proc for the report did
not
> > get
> > > executed again.
> > >
> > >
> > > "Brian Welcker [MSFT]" wrote:
> > >
> > > > By default, we do not re-execute the query unless you click the
refresh
> > > > button or ctrl-refresh in the browser. This is to maintain
consistency
> > > > between actions like print, pagination, etc.
> > > >
> > > > --
> > > > Brian Welcker
> > > > Group Program Manager
> > > > SQL Server Reporting Services
> > > >
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > >
> > > > "Pablo" <pabloda@.NOSPAMtimovil.com> wrote in message
> > > > news:udejkBM%23EHA.3708@.TK2MSFTNGP14.phx.gbl...
> > > > >u can try hitting the refresh button...
> > > > > other solution could be change the AutoRefresh property
> > > > > The report doesn't show the new row because is not a "live"
report, it
> > > > > needs to be refreshed to show new data
> > > > >
> > > > > Hope it helps,
> > > > > Pablo Diaz
> > > > >
> > > > > "Chandra" <Chandra@.discussions.microsoft.com> wrote in message
> > > > > news:CFD08605-E9FF-45FB-8986-08B047826590@.microsoft.com...
> > > > >> Hi All,
> > > > >> I have A Report inwhich Data is Populated from a stored
> > procedure,
> > > > >> When I add a new record in the database that value is not
replicated
> > > > >> immediately in the reports.It does replicate after i close the
> > browser
> > > > >> and
> > > > >> reopen it.
> > > > >> Cant Understand where Im going wrong'
> > > > >> Can any1 help me out'
> > > > >>
> > > > >> Thanks in advance...
> > > > >
> > > > >
> > > >
> > > >
> > > >
> >
> >
> >

Refreshing a report

I use a javascript to close a window and refresh another window that contains
a report. I'm trying to actually refresh the report and have it get new data
from a table.
For some reason I refresh the browser and the report doesn't refresh until
the 2nd time it's done. Anyone know why or how to fix this?Hi John,
The problem probably is that the report gets data from cache. You can
disable this in URL you are using in the Report Rendering with
"rs:ClearSession=true" option. For example I use
http://localhost/reportserver?/MyReport&rs:Command=Render&rs:ClearSession=true
Hope solve your problem.
"John" wrote:
> I use a javascript to close a window and refresh another window that contains
> a report. I'm trying to actually refresh the report and have it get new data
> from a table.
> For some reason I refresh the browser and the report doesn't refresh until
> the 2nd time it's done. Anyone know why or how to fix this?
>|||This works perfectly. Thank you so much!
"ata" wrote:
> Hi John,
> The problem probably is that the report gets data from cache. You can
> disable this in URL you are using in the Report Rendering with
> "rs:ClearSession=true" option. For example I use
> http://localhost/reportserver?/MyReport&rs:Command=Render&rs:ClearSession=true
> Hope solve your problem.
>
> "John" wrote:
> > I use a javascript to close a window and refresh another window that contains
> > a report. I'm trying to actually refresh the report and have it get new data
> > from a table.
> >
> > For some reason I refresh the browser and the report doesn't refresh until
> > the 2nd time it's done. Anyone know why or how to fix this?
> >|||ClearSession never work for us. Any ideas?
"ata" wrote:
> Hi John,
> The problem probably is that the report gets data from cache. You can
> disable this in URL you are using in the Report Rendering with
> "rs:ClearSession=true" option. For example I use
> http://localhost/reportserver?/MyReport&rs:Command=Render&rs:ClearSession=true
> Hope solve your problem.
>
> "John" wrote:
> > I use a javascript to close a window and refresh another window that contains
> > a report. I'm trying to actually refresh the report and have it get new data
> > from a table.
> >
> > For some reason I refresh the browser and the report doesn't refresh until
> > the 2nd time it's done. Anyone know why or how to fix this?
> >

Refreshing

I have report that has a grouping with a +/- for one of the groups to expand. Everytime I expand or collapse the group it seems the page refreshes and resizes. Is there a way to open an close without posting back or at least giving the appearance that the form posts back?

Thanks,

Hi Raj,

I have the same question as yours. Can you tell me your current way to work on +/- by posting back?

Many thanks,
cukhoai|||

I am not Raj, so I am not sure who you are referring to.

Right now I just group one of the items and allow another field to control the toggling. I am still looking for a way to eliminate the refresh or make it so there is no resizing.

Refresh with jsp doesnt work

Hi!

I've created a simple jsp page with a crystal report viewer on it. I used Crystal Reports Developer to design the report, as db I use access and IBM WSED to create and run the jsp file on a server. That works fine, but when I would refresh the report it shows no recordset (and also no error message appears). Why I can't refresh the data?

The code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@. page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer" %>
<%@. page import="com.crystaldecisions.sdk.occa.report.data.*" %>
<%@. page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory,
com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2,com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"
%>
<HTML>
<HEAD>
</HEAD>
<BODY>
CrystalTest.jsp

<%
try {

IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();

String report = "/CrystalReport/Report1.rpt";

Object reportSource = rptSrcFactory.createReportSource(report, request.getLocale())

CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(reportSource);

viewer.setOwnPage(true);
viewer.setTop(80);
viewer.setDisplayGroupTree(false);
viewer.setHasLogo(false);
viewer.setHasRefreshButton(true);

viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
viewer.dispose();
} catch(Exception e)
{

out.println("CrystalTest: "+e);
}
%>

</BODY
</HTML>hi there!

I've now solved the problem with a jdbc/db2 connection.

The solution is, that I must connect the Crystal Report with jdbc/db2 to the database and also connect in java/jsp to the database as the follows (only samplecode from helpfile):

setDbLogonViewReport.jsp

<%@. page import= "com.crystaldecisions.report.web.viewer.*,
com.crystaldecisions.sdk.occa.report.data.*" %>
<%@. page import="com.crystaldecisions.report.web.viewer.*" %>
<%@. page import="com.crystaldecisions.sdk.occa.report.data.*" %>
<%@. page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory" %>
<%@. page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2" %>

<%
Object reportSource = session.getAttribute("reportSource");
if (reportSource == null)
{
String report = "/reports/sample.rpt";
IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
reportSource = rptSrcFactory.createReportSource(report, request.getLocale());
session.setAttribute("reportSource", reportSource);
}

ConnectionInfos connInfos = new ConnectionInfos();
IConnectionInfo connInfo1 = new ConnectionInfo();
connInfo1.setUserName("reportLogin");
connInfo1.setPassword("");
connInfos.add(connInfo1);

CrystalReportViewer viewer = new CrystalReportViewer();

viewer.setReportSource(reportSource);
&n bsp; viewer.setEnableLogonPrompt(false);
viewer.setDatabaseLogonInfos(connInfos);

if (session.getAttribute("refreshed") == null)
{
viewer.refresh();
session.setAttribute("refreshed", "true");
}

viewer.setOwnPage(true);

viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
%>

Ask if you've more questions to that.

Friday, March 23, 2012

Refresh report without accessing database

I have a need to refresh a report after applying a filter on the data that is displayed, without accessing the database.

The following example is a simplified version of the functionality I'm trying to accomplish. The first report displays Sales & Projection data for all products. On clicking a particular product in the header, the second report displays just that product and the total metrics. I have created an rdl file for both the reports and based on the parameters passed, it displays one or several products. My concern is that the report is having to access the AS cube every time a product is clicked. In the real report, it's taking minutes to get the data. Is there way I can get the report to refresh to apply the filter without accessing the database again? Thanks in advance...

Report-1

Product

A

B

C

Total

Sales

100

200

300

600

Projection

200

200

300

700

Total

300

400

600

1300

Report-2

A

Total

Sales

100

600

Projection

200

700

Total

300

1300

I assume you have the reports set to execute live. In this case, changing parameters effectively causes RS to throw away the original report and start from scratch when you change parameter values. You may want to consider using the Cached option, this will allow RS to use the same report snapshot for a given set of query parameters and minimize the # of calls you make to the underlying AS database.|||

exactly what I needed... Thanks John.

Refresh report without accessing database

I have a need to refresh a report after applying a filter on the data that is displayed, without accessing the database.

The following example is a simplified version of the functionality I'm trying to accomplish. The first report displays Sales & Projection data for all products. On clicking a particular product in the header, the second report displays just that product and the total metrics. I have created an rdl file for both the reports and based on the parameters passed, it displays one or several products. My concern is that the report is having to access the AS cube every time a product is clicked. In the real report, it's taking minutes to get the data. Is there way I can get the report to refresh to apply the filter without accessing the database again? Thanks in advance...

Report-1

Product

A

B

C

Total

Sales

100

200

300

600

Projection

200

200

300

700

Total

300

400

600

1300

Report-2

A

Total

Sales

100

600

Projection

200

700

Total

300

1300

I assume you have the reports set to execute live. In this case, changing parameters effectively causes RS to throw away the original report and start from scratch when you change parameter values. You may want to consider using the Cached option, this will allow RS to use the same report snapshot for a given set of query parameters and minimize the # of calls you make to the underlying AS database.|||

exactly what I needed... Thanks John.

Refresh Report from Browser

I post a report on report server. I open the report from IE browser, after I
updated the database and I click REFRESH button on toolbar, report was not
refreshed. The only way is that I have to close browser and launch it again
and open the report to display refreshed data.
Could anyone let me know if we only click refresh button on the tool bar of
browser so that we can get refreshed reports?
Thanks a lot.Click the Refresh Button within the report itself.
Charles Kangai, MCT, MCDBA
"Sally" wrote:
> I post a report on report server. I open the report from IE browser, after I
> updated the database and I click REFRESH button on toolbar, report was not
> refreshed. The only way is that I have to close browser and launch it again
> and open the report to display refreshed data.
> Could anyone let me know if we only click refresh button on the tool bar of
> browser so that we can get refreshed reports?
> Thanks a lot.
>|||Here is my report url, I would like disable toolbar only except Refresh
button, how do I do that?
http://localhost/corpreportserver?/UsageReports/UsageStatusSummary&rc:parameters=false&rc:toolbar=false
Thanks,
"Charles Kangai" wrote:
> Click the Refresh Button within the report itself.
> Charles Kangai, MCT, MCDBA
> "Sally" wrote:
> > I post a report on report server. I open the report from IE browser, after I
> > updated the database and I click REFRESH button on toolbar, report was not
> > refreshed. The only way is that I have to close browser and launch it again
> > and open the report to display refreshed data.
> >
> > Could anyone let me know if we only click refresh button on the tool bar of
> > browser so that we can get refreshed reports?
> >
> > Thanks a lot.
> >
> >|||Hi Sally,
Are you talking about the Browser toolbar or the Report toolbar. They are
very different things, but both have a refresh button!
The refresh button on the report toolbar re-submits the query refreshing the
data.
The refresh button on the browser toolbar just requests the report from the
web server again, if you have 'caching' on the report it won't necessarily
submit the query again.
Look in properties and execution for the report in report manager for
'Cache' settings.
Regards
Chris
"Sally" wrote:
> Here is my report url, I would like disable toolbar only except Refresh
> button, how do I do that?
> http://localhost/corpreportserver?/UsageReports/UsageStatusSummary&rc:parameters=false&rc:toolbar=false
> Thanks,
> "Charles Kangai" wrote:
> > Click the Refresh Button within the report itself.
> >
> > Charles Kangai, MCT, MCDBA
> >
> > "Sally" wrote:
> >
> > > I post a report on report server. I open the report from IE browser, after I
> > > updated the database and I click REFRESH button on toolbar, report was not
> > > refreshed. The only way is that I have to close browser and launch it again
> > > and open the report to display refreshed data.
> > >
> > > Could anyone let me know if we only click refresh button on the tool bar of
> > > browser so that we can get refreshed reports?
> > >
> > > Thanks a lot.
> > >
> > >

Refresh problem in Crystal Viewer control

Dear Guru's
I am using Crystal viewer control in my VC++ application project. Here i am facing report refresh problem. If i call viewer control Refresh method directly the application is crashing. I am calling that inside OnPaint( ) .

The problem is the report data is not displaying first time the user has to click refresh button.

Please help me how to use "Refresh " method.

Thanks
arunNot sure if this will help, but make sure 'Save Data with Report' is NOT checked. Otherwise, have you tried calling Refresh as soon as the report is displayed (instead of waiting for the user to do it)?|||I am trying to refresh the report through code only using Viewer control 'Refresh' method.
If report displayed with blank then how user came to know that he has to refresh the report by clicking refresh button.

Refresh of Data in Crystal Report

Hello,

I'm developing Crystal Report and data is being fetched using Query. Now each time I "run" report, I get stale data. I tested query several times and that is working fine.

I also checked that,

1. File->Report Options-> Save Data with Report is UNChecked.
2. File->Options->Reporting->Save Data with Report is UNChecked.
3. File->Options->Reporting->Discard Saved Data while Loading Report is Checked.

Whenever I open report, I only see Design tab and no Preview tab. however, on running report, I get stale data. Please let me know if you know solution to this problem.

Thanks a lot in Advance,
Regards,
RupeshI am having a very similar problem. I just gave one of our users a new computer. She was running windows 2000 and she is now running windows xp. I installed crystal reports for her and imported all of her ODBC settings from the old computer to the new computer. There are two crystal reports that when she opens them, it only shows the "design tab", but no "preview tab". When I go back and open those two reports from her old computer, they open fine. I see that nobody responded to your post. Did you ever find a solution to the problem?

Thanks - Jeff|||Rupsan,
What do you mean by stale data?
Also what Ver are you using?

Texasman,
The reason your preview tab does not show up is because the savedata box is not checked in report options.|||ya exactly dear when you uncheck the save data you don't find any preview tab if you want preview click on print preview in report you will find it.

and rupsan i also don't understand what stale data means.

thanks|||I have the same issue. I have unchecked (and checked) the appropriate boxes as did the OP. On open, I do not get a preview tab (This is what I expected). However, on refresh the data on my report is last weeks data. I looked directly at the data table and there have been several additional entries that are not shown on the report. I have disconnected and reconnected to the databse, all to no avail. Can anyone figure this out?? Thanks.

Refresh Fields list

Ok, what is the secret key combination to refresh the fields list? Please? :-)
I am modifying a drilldown report I created, and have added a field returned from my stored procedure, and would now like to include this field on my report. I am clicking around and I cannot seem to trigger it to refresh the fields list, and I am receiving a build error as follows:
"The value expression for the textbox â'Regionâ' refers to the field â'REGION_ORG_CODEâ'. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope."
This field is within the current data set scope, or at least it should be. How can I include this field on my report? CTRL-ALT-F?DOH! Just noticed there is a button on the toolbar in the Data tab for this. It would be nice if this were a little more obvious.
Also, I would suggest that this feature be added to the Right click context menu in the Fields list itself.
Thanks.
"Joe" wrote:
> Ok, what is the secret key combination to refresh the fields list? Please? :-)
> I am modifying a drilldown report I created, and have added a field returned from my stored procedure, and would now like to include this field on my report. I am clicking around and I cannot seem to trigger it to refresh the fields list, and I am receiving a build error as follows:
> "The value expression for the textbox â'Regionâ' refers to the field â'REGION_ORG_CODEâ'. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope."
> This field is within the current data set scope, or at least it should be. How can I include this field on my report? CTRL-ALT-F?

Refresh default value

Hello,

I have report parameters B with default from query.

This query depend on other report parameters A that updates befor report parameter B.

While user open the report and update report parameter A, the report parameter B get default value with the right default value but when user change his selection in parameter A, the default value in parameter B doesn't changed

Any idea ?

Smashing values that the user selected (either explicitly or implicitly by not changing the default) is usually considered to be a bad thing.There exist uncommon cases where the author of the report can reasonably know the user would expect their previously selected value will be overridden. Unfortunately, RS currently doesn't have a feature which would allow the report author to distinguish the common case from the uncommon case. As a result, there is no choice but to go with a design that optimizes for the common case. (Note: RS 2000 defaulted to smashing the user’s selection with the default when an upstream parameter value changed. The resulted in a large volume of customer complaints).
One option you may want to explore which may help in this particular case: If the Valid Values list changes (as a result of the upstream parameter value changing) and it no longer contains the user’s selection, we are forced to revert to the default. Careful use of the Valid Values list can in many cases simulate the desired behavior of always overriding the user’s selection back to the default.|||

Sorry but I don't understand your answer.

I have parameter "Date Unit" (Shift, Day, Week, Month, Quarter , Year)

I have parameter "From Date"

I want while user select under "Date Unit" :

Shift or Day the from date will be Today - 7 days

Week the from date will be today - 12 weeks

Month, Quarter the from date will be today - 12 month

Year - the from date will ve today - 2 years.

Any option to do that ?

|||You can trying plugging in an expression for the default value of the From Date cascading parameter that checks Parameters!DateUnit.Value but I think this will only work the first time the report is rendered. Once the user changes the Date Unit parameter and the report refreshes, the default value of the From Date parameter won't be reset. I explained the reasons for this behaviour in my previous post.|||

This is my problem

"Once the user changes the Date Unit parameter and the report refreshes, the default value of the From Date parameter won't be reset"

|||

I know this is an older post but I found it while searching for something else. Would this work for your situation?

Write a stored procedure that takes a parameter where that parameter is the "Date Unit" you're selecting as a VARCHAR. In that sproc, you test that value and then return dynamically the correct date you want as the default for your From Date.

The sproc always returns a single row with a single column called DEFAULT_DATE or something, but what it returns is dynamic based on the parameter input. Then you create a dataset using this sproc and set it's input parameter to your Paarameters!DateUnit and set your default for your From Date to use this dataset's DEFAULT_DATE value.

I think I've done that in the past. Every time the user changes the date unit, the from date will change to the appropriate default.

...I think.

:)

sql