|
Hi friends,
I am in a strange problem. I have a swf object that shows the 3D view of a house. Now I need to embed the swf to a PDF so that it would work and play the 3d animation within the PDF itself. I know it could be done using Adobe Apollo, but it doesnt support to do this programmatically.
I want the user can download the pdf report with the flash object embeded within it.
Do you know how to do this? Any sdk that could work with .NET tech. iText is a library that does it, as they claims so, but it is in JAVA.
Regards
Abhishek
|
|
|
|
|
Hello,
I need to generate a few charts based on data stored in my database on SQL Server. I had no idea of how to generate charts with standard values itself.A little search on the Internet gave me the following code which works well:
Dim Image As New Bitmap(500, 300, PixelFormat.Format32bppRgb)
Dim g As Graphics = Graphics.FromImage(Image)
Dim redPen As New Pen(Color.Red, 10)
Dim blueBrush As New SolidBrush(Color.Blue)
Dim myImage As Bitmap
Dim p() As Integer = {1000000, 600000, 2500000, 80000}
Dim towns() As String = {"A", "B", "C", "D"}
Dim myBrushes(4) As Brush
myImage = New Bitmap(500, 300, PixelFormat.Format32bppRgb)
g = Graphics.FromImage(myImage)
' Create the brushes for drawing
myBrushes(0) = New SolidBrush(Color.Red)
myBrushes(1) = New SolidBrush(Color.Blue)
myBrushes(2) = New SolidBrush(Color.Yellow)
myBrushes(3) = New SolidBrush(Color.Green)
' Variables declaration
Dim i As Integer
Dim xInterval As Integer = 100
Dim width As Integer = 90
Dim height As Integer
Dim blackBrush As New SolidBrush(Color.Black)
For i = 0 To p.Length - 1
height = (p(i) \ 10000) ' divide by 10000 to adjust barchart to height of Bitmap
' Draws the bar chart using specific colours
g.FillRectangle(myBrushes(i), xInterval * i + 50, 280 - height, width, height)
' label the barcharts
g.DrawString(towns(i), New Font("Verdana", 12, FontStyle.Bold), Brushes.Black, xInterval * i + 50 + (width / 3), 280 - height - 25)
' Draw the scale
g.DrawString(height, New Font("Verdana", 8, FontStyle.Bold), Brushes.Black, 0, 280 - height)
' Draw the axes
g.DrawLine(Pens.Brown, 40, 10, 40, 290) ' y-axis
g.DrawLine(Pens.Brown, 20, 280, 490, 280) ' x-axis
Next
myImage.Save(Response.OutputStream, _
System.Drawing.Imaging.ImageFormat.Jpeg)
But now i need to know how in the p() array I can input values from the database dynamically i.e the number of values in the database could vary with time.The code should automatically input all the values in the table in the databse and generate the appropriate chart.How do i do this?
|
|
|
|
|
In programming practice, we mostly use classes in entity layer where only properties are there and no calculations at all.
In that scenario we can use structures also which will consume less momery and will be faster also.
For exmaple:
User.UserName, User.Password, etc.
What are the pros and cons if "User" is struct or Class.
Thanks.
|
|
|
|
|
|
Dear All,
I have created a web application which includes crystal report for reports. Now the problem is that my reports were not working on the webserver.
The Application works Perfectly on my local machine in IIS and in .net environment but if i upload the same application on the web server it shows the error.
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
What could be the solution
Thanks and Regards
Yogesh Agarwal
|
|
|
|
|
i feel it is not an error related to crystal report.
as we know custom error handlers are using for customise the default error pages.
custom error[^]
It may be some other error in you program
Do you have crystal report runtime installed on you web server?
|
|
|
|
|
Hi Thanks for the reply
I just want to check the report running on server or not. So i create a C.R. with no databinding, their is only a label in my C.R. that displays. This is my C.R.. So their is no programming involves there.
And about the runtime environment on server i have no idea.
Thanks
|
|
|
|
|
hi yogesh
for hosting are you using shared hosting server or dedicated server?
if it is dedicated server you can install crystal report runtime on your server.
|
|
|
|
|
Hi All..
I am just trying with Timer control in my web project. I have to check database at every minute and change the updates in my page.
How can I do?
Thanks in Advance
|
|
|
|
|
In the OnTick event of the Timer Control add your logic to check the database and do the necessary changes.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Ya...
My code is like..
<asp:timer id="NotificationTimer" runat="server" interval="15000" ontick="NotificationTimer_Tick">
protected void NotificationTimer_Tick(object sender, EventArgs e)
{
//My code to get data from db
}
Its working fine...But every 1 minute the page should refreshed so , remaining in the UpdatePanel like grid also loaded once again...
whats the problem?????? How to avoid this?
|
|
|
|
|
In my application i have to use a timer.Actually a print option which will be enabled after 5 min.after a print is done it will be disabled for 5 min,i.e no print will be done for next 5 min.After that one can print it.
How can it be achieved.
|
|
|
|
|
use SetInterval to increment a value after a certain interval.. and check if 5 min is elapsed.
After that make print enabled..
|
|
|
|
|
thanx for your response.
Can you explain it with an example.
|
|
|
|
|
Hi guys i am getting value in exponential
like :3.14765786987878E-6
I need thsi value in exact way
like : 0.00 some thing it has to come..,
I searched in google and tried in all the ways but i didnt get solution...,
plz help me,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Hi,
I am implementing auto complete extender in my project. I want a loading image to be displayed in the textbox while the data is being fetched from database and presented to the user.
<asp:TextBox id="TextBox2" Width="216px" runat="server" Text='<%# Bind("c_name") %>' autocomplete="off" ></asp:TextBox><br />
<br />
<cc1:AutoCompleteExtender id="AutoCompleteExtender1" runat="server" ServiceMethod="fetch" TargetControlID ="TextBox2" ServicePath="autocom.asmx" CompletionSetCount ="12" EnableCaching ="true" MinimumPrefixLength ="2"> <br />
</cc1:AutoCompleteExtender>
|
|
|
|
|
You can use AJAX UpdateProgress control to get that functionality. See here UpdateProgress control[^]
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
md_azy wrote: I want a loading image to be displayed in the textbox while the data is being fetched from database and presented to the user
use AJAX UpdateProgress Control.
|
|
|
|
|
1st Approach
<script type="text/javascript">
function ShowImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'url(images/loader.gif)';
document.getElementById('txtAutoComplete')
.style.backgroundRepeat= 'no-repeat';
document.getElementById('txtAutoComplete')
.style.backgroundPosition = 'right';
}
function HideImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'none';
}
</script>
Now write this code in Page_Load event of aspx page
protected void Page_Load(object sender, EventArgs e)
{
this.txtAutoComplete.Attributes.Add
("onkeypress", "ShowImage()");
this.txtAutoComplete.Attributes.Add
("onblur", "HideImage()");
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2nd approach
This approach works if you are using newer versions of AjaxControlToolkit.dll (Version 1.0.20229.20821 or later)
For this write the above mentioned javascript in head section of html markup of page.
Now in source of autocomplete extender add OnClientPopulating="ShowImage" and OnClientPopulated="HideImage"
<ajaxToolkit:AutoCompleteExtender runat="server"
ID="AutoComplete1"
BehaviorID="autoComplete"
TargetControlID="txtAutoComplete"
ServicePath="AutoComplete.asmx"
ServiceMethod="GetCompletionList"
MinimumPrefixLength="1"
CompletionInterval="10"
EnableCaching="true"
CompletionSetCount="12"
CompletionListCssClass=
"autocomplete_completionListElement"
CompletionListItemCssClass=
"autocomplete_listItem"
CompletionListHighlightedItemCssClass=
"autocomplete_highlightedListItem"
onclientpopulating="ShowImage"
onclientpopulated="HideImage">
</ajaxToolkit:AutoCompleteExtender>
<script type="text/javascript">
function ShowImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'url(images/loader.gif)';
document.getElementById('txtAutoComplete')
.style.backgroundRepeat= 'no-repeat';
document.getElementById('txtAutoComplete')
.style.backgroundPosition = 'right';
}
function HideImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'none';
}
</script>
|
|
|
|
|
Hi,
I have a GridView with a FormView on its EmptyDataTemplate so that user can insert a row initially. I provide controls on Footer so that user can add rows from within the GridView. I also use inline editing and deletion. Datasource is SqlDataSource.
Problem is that when I refresh the page duplicate row is added with previous data in the grid footer controls.
I tried many ways to avoid it, I tried
Page.IsValid (it returns true!), I tried to check for
e.Command == "insert" , that too is correct. Even the
TextBox.Text has values though it is empty after a manual insert operation.
What am I doing wrong here?
Regards,
Blumen
“Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.”
|
|
|
|
|
In the Insert command event,write the code which validates the data to check for the duplicates and then insert into the SqlDataSource. Update the gridview only if the transaction is successful.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Thank you, I appreciate that. I was looking for less-code approach
“Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.”
|
|
|
|
|
Ok! Find it out and let me know
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Hi All,
On a button click event I redirect to a page as like this.
Response.Redirect("MyPage.aspx")
But it redirect to another page. Actually when I debug the code and see it working fine. But after hosting the size on IIS and access through the local IP url it doesn't work. Any suggestions?
I appreciate your help all the time...
CodingLover
|
|
|
|
|
The only thing this code can do, is redirect to MyPage.aspx. If you end up at another page, then other code is running, or that page is redirecting you again.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|